You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve noticed that the internal function op_otel_log already exists in Deno, but it isn’t exposed through the public API. Right now, if we want to send structured logs to OpenTelemetry, we have to funnel everything through console.log, which adds unnecessary overhead and can significantly slow down our applications. It would be very helpful to have a dedicated, public-facing API (or module) that wraps op_otel_log so we can emit logs directly into OTEL without relying on the console.
This change would reduce performance penalties, give us finer control over log format and context, and make it easier to integrate Deno with existing observability pipelines.
The text was updated successfully, but these errors were encountered:
Ideally, we’d expose telemetry logging in a standardized way, perhaps through something like @std/log or a new @std/telemetry module. In the meantime, it would be valuable to surface a native logging interface directly on the Deno.telemetry namespace.
One option is to expose a simple Deno.telemetry.log(message, level) function that directly calls the existing internal otelLog (see the implementation at telemetry.ts#L1182). From there, a standard library module @std/telemetry could wrap Deno.telemetry.log behind a familiar logger API (for example, providing logger.info, logger.warn, logger.debug, and logger.error methods).
Alternatively, we could skip creating a separate std-lib package and simply add a Deno.telemetry.getLogger() method. That way, consumers could call Deno.telemetry.getLogger().info("…") (or warn, debug, error) directly without needing an extra import. Either approach would give application authors a consistent, low-overhead way to emit OpenTelemetry-style logs without falling back to console.log.
I’ve noticed that the internal function
op_otel_log
already exists in Deno, but it isn’t exposed through the public API. Right now, if we want to send structured logs to OpenTelemetry, we have to funnel everything through console.log, which adds unnecessary overhead and can significantly slow down our applications. It would be very helpful to have a dedicated, public-facing API (or module) that wrapsop_otel_log
so we can emit logs directly into OTEL without relying on the console.This change would reduce performance penalties, give us finer control over log format and context, and make it easier to integrate Deno with existing observability pipelines.
The text was updated successfully, but these errors were encountered: